import { Button, Modal } from 'antd';
import React from 'react';

function AddTreeItemModal({ visible, data, onClose, onAddProcess, onAddSubDir }) {

  return (
    <Modal
      title="新建流程"
      width="450px"
      destroyOnClose
      onCancel={onClose}
      visible={visible}
      footer={null}
    >
      <div style={{ marginBottom: '8px', fontWeight: 'bold' }}>请选择要新建的类型</div>
      <Button size="large" block type="primary" onClick={() => onAddProcess(data)}>
        + 新建流程
      </Button>
      <div style={{ textAlign: 'center', padding: '8px 0px' }}>支持简易流程创建。</div>
      <Button size="large" block type="primary" ghost onClick={() => onAddSubDir(data)}>
        + 新建流程目录
      </Button>
      <div style={{ textAlign: 'center', padding: '8px 0px' }}>支持简易子目录创建。</div>
    </Modal>
  );
}

export default AddTreeItemModal;
